Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python Sol 1063 content/3_Silver/Sorting_Custom.mdx #4899

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

CryoJS
Copy link
Contributor

@CryoJS CryoJS commented Nov 5, 2024

Added a Python solution to the example problem in Sorting_Custom: Rectangular Pasture

Notes

  • The Python solution TLEs even with the correct time complexity (I believe it to be similar if not more optimized than the C++ solution). On a different OJ with PyPy3 (DMOJ), the longest case takes 0.502s.
  • I added the exact same note that Java has for lambda with a different link since there is not much to change.
  • I'm not 100% sure if I need to add my solution if it's a solution for a problem in the module. That's why box 2 is not checked.

Place an "x" in the corresponding checkbox if it is done or does not apply to this pull request.

  • I have tested my code.
  • I have added my solution according to the steps here.
  • I have followed the code conventions mentioned here.
    • I understand that if it is clear that I have not attempted to follow these conventions, my PR will be closed.
    • If changes are requested, I will re-request a review after addressing them.
  • I have linked this PR to any issues that it closes.

@SansPapyrus683
Copy link
Contributor

oh wtf there's usaco problems on dmoj?

@CryoJS
Copy link
Contributor Author

CryoJS commented Nov 5, 2024

oh wtf there's usaco problems on dmoj?

Not really lol, it's just there as a private problem uploaded by Olympiads School.

Copy link
Member

@ryanchou-dev ryanchou-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i wonder if the tle is because of their server updating a few years back

content/3_Silver/Sorting_Custom.mdx Outdated Show resolved Hide resolved
content/3_Silver/Sorting_Custom.mdx Outdated Show resolved Hide resolved
for i in range(n):
points[i][0] = i + 1

psa = [[0 for _ in range(n + 1)] for _ in range(n + 1)]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ik this is prefix sums but what does psa actually stand for

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants